/**
 * Project:   dtu.fmes.googleloon
 * File:      Area.java
 * License: 
 *            This file is licensed under GNU General Public License version 3
 *            http://www.gnu.org/licenses/gpl-3.0.txt
 *
 * Copyright: Bartosz Cichecki [ cichecki.bartosz@gmail.com ]
 * Date:      Oct 12, 2013
 */

package dtu.fmes.loon.model.environment;

/**
 * 
 * @author Bartosz Cichecki
 */
public class Area {

	protected Double xSize;

	protected Double ySize;

	public Area() {

	}

	public Area(Double xSize, Double ySize) {
		this.xSize = xSize;
		this.ySize = ySize;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		Area other = (Area) obj;
		if (xSize == null) {
			if (other.xSize != null) {
				return false;
			}
		} else if (!xSize.equals(other.xSize)) {
			return false;
		}
		if (ySize == null) {
			if (other.ySize != null) {
				return false;
			}
		} else if (!ySize.equals(other.ySize)) {
			return false;
		}
		return true;
	}

	public Double getxSize() {
		return xSize;
	}

	public Double getySize() {
		return ySize;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (xSize == null ? 0 : xSize.hashCode());
		result = prime * result + (ySize == null ? 0 : ySize.hashCode());
		return result;
	}

	public void setxSize(Double xSize) {
		this.xSize = xSize;
	}

	public void setySize(Double ySize) {
		this.ySize = ySize;
	}

	@Override
	public String toString() {
		return "Area [xSize=" + xSize + ", ySize=" + ySize + "]";
	}

}
